getCSPSummary <- function(TS, version=0, from="1992", to=NULL) {
  pattern <- get(paste('getCSPPattern', version, sep=""))(TS, from=from, to=to)
  candles <- dim(pattern)[1]
  columns <- dim(pattern)[2]
  sumobs <- colSums(pattern, na.rm=TRUE)
  
  mat <- matrix(c(colSums(pattern, na.rm=TRUE), 
                colSums(pattern, na.rm=TRUE)*100/candles),
                nrow=columns)
  rownames(mat) <- colnames(pattern)
  colnames(mat) <- c("#Obs", "Pct")
  return(as.table(mat))
}
